<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color:red;
            border: 10px dashed green;
            padding: 20px; 
            background-image: url("./wxy.jpeg");
        }
        div:hover{
            background-position: -103px -9px;
        }
        h1{
            width: 500px;
            height:500px;
            border: 5px dashed blue;
            /* padding: 20px; */
            /* background-image: url("./wxy.jpeg");
            background-repeat: no-repeat;
            background-color: pink; */
            /* background-size: 500px 500px; */
            /* background-position:50px 50px; */
            background: pink url("./wxy.jpeg") no-repeat 50px 100px;
        }
    </style>
</head>
<body>
    <div></div>
    <h1>背景</h1>
</body>
</html>